// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	2/26/2015 5:58:30 PM				
// -----------------------------

#ifndef _FileManager_h
#define _FileManager_h

#include "Common.h"

namespace Flow
{

	class FilePackage;

	class FileManager
	{
	public:
		FileManager();
		~FileManager();

		Bool			LoadPackage(const tstring& name, const tstring& path);
		void			UnloadPackage(const tstring& name);
		void			UnloadPackage(FilePackage* lpPackage);

		FilePackage*	GetPackageByName(const tstring& name) const;
		FilePackage*	GetPackageByPath(const tstring& path) const;
		FilePackage*	GetPackageByIndex(UInt32 idx) const;
		FilePackage*	FindPackageForFile(const tstring& name) const;

		UInt32			GetPackageCount() const;
		Bool			DoesPackageExistByName(const tstring& name) const;
		Bool			DoesPackageExistByPath(const tstring& path) const;

	private:

		vector<FilePackage*>	m_Packages;

		FileManager(const FileManager& refFileManager);
		FileManager& operator=(const FileManager& refFileManager);
	};

}

#endif